x86: Small simplification to get_page_from_l1e().
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 26 Oct 2009 13:26:43 +0000 (13:26 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 26 Oct 2009 13:26:43 +0000 (13:26 +0000)
No need for separate top-level check for page owner being NULL: this
can be folded into the case that page owner is not who the caller
expected (caller will never expect NULL owner).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/mm.c

index f30d9ca2fda3650c59a30240cd3c4cd3cefe1aaf..f50b5fab87f592beac85a4bccc843f6ad098403d 100644 (file)
@@ -780,9 +780,6 @@ get_page_from_l1e(
         return 1;
     }
 
-    if ( real_pg_owner == NULL )
-        goto could_not_pin;
-
     if ( unlikely(real_pg_owner != pg_owner) )
     {
         /*
@@ -791,7 +788,8 @@ get_page_from_l1e(
          * dom0, until pvfb supports granted mappings. At that time this
          * minor hack can go away.
          */
-        if ( (pg_owner == l1e_owner) || !IS_PRIV_FOR(pg_owner, real_pg_owner) )
+        if ( (real_pg_owner == NULL) || (pg_owner == l1e_owner) ||
+             !IS_PRIV_FOR(pg_owner, real_pg_owner) )
             goto could_not_pin;
         pg_owner = real_pg_owner;
     }